import {Routes, RouterModule} from '@angular/router';
import {ModuleWithProviders} from '@angular/core';

import { ArticleListComponent } from './article-list/article-list.component';
import { AddComponent } from './add/add.component';
import { ClassifyListComponent } from './classify-list/classify-list.component';
import { ModifyComponent } from './article-list/modify/modify.component';

export const routes: Routes = [
  {
    path: 'add',
    component: AddComponent,
    children: []
  },

  {
    path: 'article-list',
    component: ArticleListComponent,
    children: []
  },

  // {
  //   path: 'article-list/add',
  //   component: AddComponent2,
  //   children: []
  // },


  {
    path: 'article-list/modify/:id',
    component: ModifyComponent,
    children: []
  },

  {
    path: 'classify-list',
    component: ClassifyListComponent,
    children: []
  }
];

export const routing: ModuleWithProviders = RouterModule.forChild(routes);
